package com.estun.backroundManagementService.modules.device.controller;

import com.estun.backroundManagementService.domain.BaseResponse;
import com.estun.backroundManagementService.modules.device.service.DeviceStatusService;
import com.estun.backroundManagementService.modules.product.request.ProductRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "DeviceStatusController", description = "设备状态")
@RequestMapping("/deviceStatus")
@AllArgsConstructor
public class DeviceStatusController {

    @Autowired
    private DeviceStatusService deviceStatusService;

    @ApiOperation(value = "获取产线设备状态")
    @GetMapping("/getDeviceStatus")
    public BaseResponse getDeviceStatus() {
        return BaseResponse.success(deviceStatusService.getDeviceStatus());
    }
}
